#pragma once

#include <string>
#include <functional>
#include <system_error>
#include "helper/sqlite/shortcut/DBWrapper.h"

namespace helper {
namespace sqlite {
  class IDB;
  class ExecutionResult;
  class Statement;

}//namespace sqlite
}//namespace helper

namespace helper {
namespace sqlite {
namespace shortcut {

class Executor : public DBWrapper {
public:
  using fbind_type = std::function<std::error_code (Statement & stmt)>;

  explicit Executor(IDB & db);
  ~Executor() override;

  ExecutionResult execute(const std::string & sql,  const fbind_type & fbind = fbind_type()) ;
};


}//namespace shortcut
}//namespace sqlite
}//namespace helper
